package com.demo.common;

import java.util.List;

import com.demo.po.User;
import com.jfinal.core.Controller;

public class BaseController extends Controller{
	
	public String getUserId(String username){
		User user = new User();
		String userid = null;
		List<User> users = user.find("select * from user where username=?", username);
		if(user != null && users.size() > 0){
			userid = users.get(0).get("id").toString();
		}
		return userid;
	}
}
